package com.aioz.security.controller;


import com.aioz.security.common.ResponseResult;
import com.aioz.security.service.impl.CategoryMenuServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Aioz
 * @since 2022-10-18
 */
@RestController
@RequestMapping("/category-menu")
public class CategoryMenuController {

    @Autowired
    private CategoryMenuServiceImpl categoryMenuService;

    @GetMapping("/top")
    public ResponseResult getTopCategoryMenu(){
        return categoryMenuService.topCategoryMenus();
    }

    @GetMapping("/get")
    public ResponseResult getCategoryMenu(){
        return categoryMenuService.getCategoryMenus();
    }
}
